#pragma once
#include <iostream>
#include <pthread.h>
class myCond
{
public:
    myCond(pthread_cond_t &cond, pthread_mutex_t &mtx) : _mcond(cond), _mtx(mtx)
    {
    }
    void wait()
    {
        pthread_cond_wait(&_mcond,&_mtx);
    }
    void singal()
    {
        pthread_cond_signal(&_mcond);
    }
private:
    pthread_cond_t &_mcond;
    pthread_mutex_t &_mtx;
};